package com.wei.config;

import com.wei.interceptor.HistoryUrlsInterceptor;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/*
* 注册拦截器
* */
@Configuration
@RequiredArgsConstructor
public class WebMvcConfig implements WebMvcConfigurer {


    private final HistoryUrlsInterceptor historyUrlsInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(historyUrlsInterceptor)
//                .addPathPatterns("/**")
//                .excludePathPatterns("/css/**", "/js/**", "/images/**", "/*.pdf");
    }
}
